package com.net.xpay.core.domain;

import com.net.common.domain.VersionedDomain;
import com.net.xpay.core.enums.AlipayUserStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 2020/4/25 21:01

 * 一个用户可以绑定多个支付宝账号
 */
@Getter
@Setter
@NoArgsConstructor
public class AlipayUser extends VersionedDomain {
    @ApiModelProperty(notes = "userId")
    private Long userId;

    @ApiModelProperty(notes = "注册手机号")
    private String mobile;

    @ApiModelProperty(notes = "备注 最多16个字")
    private String remark;

    @ApiModelProperty(notes = "签约状态")
    private AlipayUserStatus status;

    @ApiModelProperty(notes = "支付宝官方账号用户id 不是本系统的")
    private String alipayUserId;

    @ApiModelProperty(notes = "支付宝账号")
    private String alipayNickName;

    @ApiModelProperty(notes = "外部签约事务号")
    private String signBizNo;

    @ApiModelProperty(notes = "签约事务号")
    private String isvBizId;

    @ApiModelProperty(notes = "authToken")
    private String authToken;

    @ApiModelProperty(notes = "refreshToken")
    private String refreshToken;

    @ApiModelProperty(notes = "令牌过期时间")
    private LocalDateTime expiresIn;

    @ApiModelProperty(notes = "刷新令牌过期时间")
    private LocalDateTime reExpiresIn;

    @ApiModelProperty(notes = "是否已被删除")
    private Integer isDeleted;

    public static AlipayUser getInstance() {
        return new AlipayUser();
    }
}
